<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <button>1</button>
        <button>2</button>
        <button>3</button>
        <button>4</button>
        <button>5</button>
        <button>6</button>
        <button>7</button>
        <button>8</button>
        <button>9</button>
        <button>10</button>
        <button>11</button>
        <button>12</button>
        <button>13</button>
        <button>14</button>
        <button>15</button>
        <button>16</button>
        <button>17</button>
        <button>18</button>
        <button>19</button>
        <button>20</button>
    </div>
    <script>
        var oDiv= document.querySelector('div')
        oDiv.addEventListener('click',clickHandler)
        
        function clickHandler(e){
           alert(e.target.innerText+"---我出来了")
        }
    </script>
</body>

</html>